package com.hqyj.cloudTest.controller;


import com.hqyj.cloudTest.service.CountryService;
import com.hqyj.entity.Test.Country;
import com.hqyj.entity.common.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * personal demo
 **/
@RestController
@RequestMapping("/api/test")
public class CountryController {

    @Autowired
    private CountryService countryService;

    @GetMapping(value = "/country/{id}")
    public Result<Country> getCountryById(@PathVariable int id){
        return countryService.getCountryById(id);
    }
}















